Digital video images are typically compressed using difference encoding. In order to achieve data compression, such systems typically encode only the difference between pixels in lieu of encoding each pixel in the image as a stand alone value. Since the differences between pixels are typically small, difference encoding often results in substantial data compression.
Known difference encoding systems determine the pixel differences used for image compression by differencing neighboring vertically aligned pixels in an image. More particularly, in such systems, each pixel in a first horizontal row of an image is vertically differenced with a corresponding vertically aligned pixel positioned in a second horizontal row immediately below the first row. The pixels in the image being encoded are typically processed in a horizontal scan order so that pointer incrementation involves simple incrementation along the horizontal axis.
It was found that when digital video data was encoded in accordance with blocks of pixels, as opposed to horizontal lines, vertical differencing of pixels was not optimal. It was found that performing vertical pixel differencing for pixels in a block of pixels and then moving to a next block in a horizontal manner created a zig-zag pattern during the encoding process. The drawbacks caused by this zig-zag effect are demonstrated by the following example wherein 4.times.4 blocks of pixels in an image being encoded are sequentially processed in raster-scan order. In the example, the first block (in the upper-leftmost corner of the image) is encoded as follows:
Pixel(row 1, col. 1) is differenced with Pixel(row 0, col. 1) PA1 Pixel(row 2, col. 1) is differenced with Pixel(row 1, col. 1) PA1 Pixel(row 3, col. 1) is differenced with Pixel(row 2, col. 1) PA1 Pixel(row 4, col. 1) is differenced with Pixel(row 3, col. 1) PA1 Pixel(row 1, col. 2) is differenced with Pixel(row 0, col. 2) PA1 Pixel(row 2, col. 2) is differenced with Pixel(row 1, col. 2) PA1 Pixel(row 3, col. 2) is differenced with Pixel(row 2, col. 2) PA1 Pixel(row 4, col. 2) is differenced with Pixel(row 3, col. 2) PA1 Pixel(row 1, col. 3) is differenced with Pixel(row 0, col. 3) PA1 Pixel(row 2, col. 3) is differenced with Pixel(row 1, col. 3) PA1 Pixel(row 3, col. 3) is differenced with Pixel(row 2, col. 3) PA1 Pixel(row 4, col. 3) is differenced with Pixel(row 3, col. 3) PA1 Pixel(row 1, col. 4) is differenced with Pixel(row 0, col. 4) PA1 Pixel(row 2, col. 4) is differenced with Pixel(row 1, col. 4) PA1 Pixel(row 3, col. 4) is differenced with Pixel(row 2, col. 4) PA1 Pixel(row 4, col. 4) is differenced with Pixel(row 3, col. 4)
After this first block is processed, the system next turns to the first pixel in the 4.times.4 block to the right of the first block, i.e., the pixel at row 1, col. 5, for encoding. This represents traversing the digital video image in a zig-zag pattern during encoding. One result of this zig-zag pattern is that data from the first block, e.g., Pixel(row 4, col. 1), must be temporally saved until all the pixel blocks in the first horizontal row of horizontal blocks have been processed and the system returns to process Pixel(row 5, col. 1). Such temporary saves typically require a data save operation and a data read back operation once every four rows. In addition, a register must typically be devoted to maintain a pointer to the temporarily saved data.
It is an object of the present invention to provide a more efficient difference encoding system which avoids the temporary data save operations typically associated with vertical difference encoding.
It is a further object of the present invention to eliminate the use of a register for maintaining the address of temporarily stored data typically associated with vertical difference encoding.
Further objects and advantages of the invention will become apparent from the description of the invention which follows.